﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	CreateNews
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

 <link href="../../Content/template.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/validationEngine.jquery.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.validationEngine-vi.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.validationEngine.js" type="text/javascript"></script>
<link href="../../Content/Admin/control.css" rel="stylesheet" type="text/css" />
    <script src="../../Content/ckeditor/ckeditor.js" type="text/javascript"></script>
    <script src="../../Scripts/validate.js"></script>
        <link href="../../Content/Style/layoutAll.css" rel="stylesheet" type="text/css" />   
<script>
    jQuery(document).ready(function () {
        // binds form submission and fields to the validation engine
        jQuery("#formID").validationEngine();
    });
</script>
 <script type="text/javascript">
     var editor;
     function taoeditor(languagecode, id) {
         var editor = CKEDITOR.replace(id, { language: languagecode });
     }
     $(function () { taoeditor('vi', 'noidung') });
         </script>
      <form method="post" action="/News/CreateNews" id="formID">
    <table width="100%">
    <tr>
   <td style="width: 20px">Tiêu đề tin: </td><td><input type="text" name="NewsName" class="validate[required]" /></td>
    </tr>
    <tr>
   <td style="width: 20px">Nội dung: </td><td><textarea name="Content" id="noidung" class="validate[required]"></textarea></td>
    </tr>
    <tr>
    <td style="width: 20px">Ngày đăng:</td><td><%--<input type="text" name="DatePost" value="<%:ViewData["datenow"] %>" />--%><%:ViewData["datenow"] %></td>
    </tr>
    <tr><td style="width: 20px">Loại tin</td><td><%if (ViewData["listcate"] != null)
                               { %><%:Html.DropDownList("listcate", "--Chọn tên loại tin--")%><%} %><img id="img_listcate" /><span id="listcateErr"></span></td></tr>
                               <tr>
                               <td style="width: 20px">Người đăng:</td>
                               <td><%=Session["UserName"] %></td>
                             <%--  <td><%if (ViewData["listuser"] != null)
                                     {%>
                                     <%:Html.DropDownList("listuser", "--Chọn người đăng--")%>
                                        <%}%>
                                    </td>--%>
                               </tr>
    </table>
    <div class="Control">
    <input type="submit" value="Thêm" class="vadd" />
    <%:Html.ActionLink("Quay lại", "GetNews", "News", new { @class = "vback" })%>
    </div>
    </form>

</asp:Content>
